package com.lcfc.attend.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.lcfc.attend.entity.SysOffice;
import com.lcfc.attend.entity.vo.ClockHistogram;
import com.lcfc.attend.entity.vo.EmpStabilityVo;
import com.lcfc.attend.entity.vo.LineVo;
@Mapper
public interface SysOfficeMapper {
    int deleteByPrimaryKey(String officeCode);

    int insert(SysOffice record);

    int insertSelective(SysOffice record);

    SysOffice selectByPrimaryKey(String officeCode);

    int updateByPrimaryKeySelective(SysOffice record);

    int updateByPrimaryKey(SysOffice record);
    /**
	 * 根据公司名获取线路
	 * @param officeCode
	 * @return
	 */
	List<LineVo> queryLineByOffice(@Param(value="officeCode")String officeCode);
	/**
	 * 人员稳定性情况柱状图
	 * @param officeCodes
	 * @param dateFlag
	 * @param standard
	 * @return
	 */
	List<EmpStabilityVo> queryEmpStability(@Param(value="officeCode")String officeCodes, @Param(value="dateFlag")String dateFlag, @Param(value="standardDay")int standardDay);
	/**
	 * 根据officeCode获取在岗总人数
	 * @param officeCode
	 * @return
	 */
	EmpStabilityVo queryAllByOffice(@Param(value="officeCode")String officeCode);
	/**
	 * 获取线路
	 * @return
	 */
	List<LineVo> queryLines();
	/**
	 * 获取安检公司打卡情况
	 * @param noClock 
	 * @param omission 
	 * @param early 
	 * @param late 
	 * @param normal 
	 * @param usercode
	 * @return
	 */
	List<ClockHistogram> queryClockSituation(@Param(value="officeCodes")String officeCodes, @Param(value="dateFlag")Integer dateFlag, @Param(value="attenStates")String attenStates, @Param(value="normal")Integer normal, @Param(value="late")Integer late, @Param(value="early")Integer early, @Param(value="omission")Integer omission, @Param(value="noClock")Integer noClock);
	/**
	 * 获取线路打卡情况
	 * @param officeCodes
	 * @param dateFlag
	 * @param attenStates
	 * @return
	 */
	List<ClockHistogram> queryLineSituation(@Param(value="lines")String lines, @Param(value="dateFlag")int dateFlag, @Param(value="attenStates")String attenStates, @Param(value="normal")Integer normal,
			@Param(value="late")Integer late, @Param(value="early")Integer early, @Param(value="omission")Integer omission, @Param(value="noClock")Integer noClock);
}